Technical Q&As


SND10 - Selecting a Specific Sound Input Source (16-January-98)


Q What is the best way to select a specific sound input source, such as the CD or external microphone?

A Beginning with Mac OS 8.1, the sound input drivers have implemented some new SPBGetDeviceInfo/SPBSetDeviceInfo selectors. Those new selectors are siOSTypeInputSource 'inpt' and siOSTypeInputAvailable 'inav'. They work much like siInputSource and siInputSourceNames, except that they return an OSType rather than an integer and a list of OSTypes rather than a list of names, respectively.

Using the siOSTypeInputSource selector allows you to specify an input source, such as the external microphone, with a simple constant, kExtMicSource ('emic').

If these new selectors are not available, SPBGetDeviceInfo will return siUnknownInfoType, so no preflighting is required. Make the call; it will work or returns an error.



-- Mark Cookson
Worldwide Developer Technical Support

Technical Q&As
Previous Question | Contents | Next Question


To contact us, please use the Contact Us page.